package com.bw.common.provider

import android.content.Context
import com.bw.common.entity.TempUserEntity
import com.tencent.mmkv.MMKV

/***
 * 提供基础服务
 */

abstract class BaseServerProvider: IBaseServerProvider {

    private lateinit var mContext :Context
    override fun checkLoginState(): Boolean {
        val  loginToken = MMKV.defaultMMKV().decodeString("token","").toString()
        if (!loginToken.isNullOrEmpty()) {
            return true
        }
        return false
    }

    override fun getLoginToken(): String {
       return MMKV.defaultMMKV().decodeString("token","").toString()
    }



    override fun init(context: Context?) {
        context?.let {
            mContext = it
        }
    }
}